Calculated values are simple calculations. These can be arithmetical calculations (eg. adding the values of two other items together) but they can also be used to fill in text values and look up data entered elsewhere. Numerical calculations can be output as whole numbers, to decimals, to times or to financial values. |
Total scoreLeaving the calculation field empty prompts a “total score” type calculation. This uses the associated numeric value of a drop-down or multiple choice list (if entered in the list entry).
For example, a drop-down list may contain parts for a repair and the associated value may be the cost of that part. When selected in the multiple choice list, that cost will be displayed. |
||
Arithmetic (2 values)Arithmetic operators "+" for addition, "-" for subtraction, "*" for multiplication and "/" for division can be used as shown below. In many cases both values will be unique names, but fixed numbers can also be used.
|
||
LookupThis calculation is used to display a numeric result associated with another item on the form. Use @uniquename where uniquename is replaced by the actual unique name of the item whose result you wish to display. |
||
Lookup (table)When looking up values from table items, you can also use the syntax @uniquename:sum(colName) to sum the values of all colName values within the table. |
||
Lookup headerThis calculation allows you to display general form information (customer, location, date, etc) and sequence numbers. Multiple pieces of information can be displayed together, separated by "$" in the format $xxxx$yyyy$zzzz where xxxx, yyyy and zzzz can be the following. |
||
:(followed by text)This will display the text. When combined with lookup items below, this can be used to generate, for instance, "Call out to Bridge Farm Garage" by entering '$:Call out to $location'. |
||
seq:This is used to generate a sequential number using the syntax $seq:sequence name:starting number:increment. For example $seq:Order number:1000:1 tells the application to use the sequence of numbers that we’re calling ‘Order number’, start at 1000 and then add 1 on every time. The following components must be separated by colons (':').A sequence name can be shared between forms but a sequence number calculated on a device is local to that device so there is a danger of duplication. For this reason, unique sequential numbers that are used on more than one device are more safely stored and allocated centrally on the server (see template actions). The problem can also be solved by employing a username to give a unique value such as: CORE PRODUCT NAME%% but is useful to recognise what has been set up. It also enables different, independent sequences of numbers such as Quotation numbers and Invoice numbers. Starting number is the initial value to use. It is often a multiple of 10 (such as 100, 1000, 100000) to facilitate string manipulation in case it is subsequently to be used as text. The device user will be asked to confirm the starting number when a sequence is first used so as to prevent a sequence from accidentally re-using previous numbers. Increment is the amount that will be added to the last number each time. Very often this is set at 1 to provide a meaningless but unique string for identification purposes (eg document number, purchase order number) but it can be any integer. |
||
Customer and report dataStatic header information as follows:
|